import { Input, InputProps } from 'antd';
import { BaseSyntheticEvent } from 'react';

export default function InputWidget(props: InputProps) {
  const { onChange, ...res } = props;

  function handleChange(e: BaseSyntheticEvent) {
    onChange?.(e.target.value);
  }

  return <Input {...res} onChange={handleChange} />;
}
